package com.singfan.core.dao.database;

import com.singfan.core.dao.database.model.Orders;

import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;

/**
 *
 * Author: hansonghe
 * Date: 2015-08-19 12:12
 * Desc:
 */
public interface IOrderDao {
    void create(Orders order);

    void update(Orders order);

    void deleteById(long orderId);

    void updateChannelSerialNumber(long orderId, String payChannelSerialNumber);

    void updateStatus(long orderId, int status);

    Orders selectOrder(String payChannelSerialNumber);

    List<Orders> selectCustomerOrderList(long customerId, int orderStatus, int pageIndex, int pageSize);

    Orders selectOrder(long orderId);

    void updateCommentStar(long orderId, int star);

    int barberOrderCount(long barberId);

    int barberUnfinishOrderCount(long barberId);

    List<Orders> selectBarberOrderList(long barberId, int orderStatus, int pageIndex, int pageSize);

    List<Long> selectExpiredOrder(Date limitCreateTime);

    boolean isExist(long barberId, int dayTime, int clockTime);

    LinkedHashMap<Integer, Integer> selectBarberIncomeTotalByMonth(long barberId);

    int selectBarberIncomeTotal(long barberId);

    List<Orders> selectBarberOrderDetailList(long barberId, int orderFilterType, int pageIndex, int pageSize);

    void updateOrderServiced(long orderId);

    int selectShopOneDayIncome(long shopId, int dayTime);

    int selectShopOneDayOrderCount(long shopId, int dayTime);

    List<Orders> selectShopOneDayOrderList(long shopId, int dayTime);

    int selectShopOneMonthIncome(long shopId, int monthTime);

    int selectShopOneMonthOrderCount(long shopId, int monthTime);

    Orders selectOrdersBySecurityCode(long shopId, String securityCode);

    List<Orders> selectShopOrderDetailList(long shopId, int orderFilterType, int pageIndex, int pageSize);

    List<Orders> selectCustomerOrderList(String customerPhone);

    List<Orders> selectOneMonthOrdersList(int month, long shopId);
}